package dao

import "context"

// StoreFactory 定义所有持久化后端（关系库 / KV / 嵌入式）的通用工厂接口
type StoreFactory interface {
	Connect(ctx context.Context) error
	Close() error
}

var factories []StoreFactory

// RegisterFactory 注册一个 StoreFactory（在 init() 中自动调用）
func RegisterFactory(f StoreFactory) {
	factories = append(factories, f)
}
